//
//  CirContentCell.m
//  Shengzhuli
//
//  Created by 卡忙科技 on 16/12/15.
//  Copyright © 2016年 kamangkeji. All rights reserved.
//

#import "CirContentCell.h"
#import <UIImageView+WebCache.h>

@interface CirContentCell()

@property (weak, nonatomic) IBOutlet UIImageView *iconView;
@property (weak, nonatomic) IBOutlet UILabel *nameLab;
@property (weak, nonatomic) IBOutlet UILabel *timeLab;
@property (weak, nonatomic) IBOutlet UILabel *contentLab;

@end

@implementation CirContentCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (CGFloat)getCellHeightWithModel:(FriendsDetailModel *)model
{
    self.model = model;
    [self.contentLab sizeToFit];
    return CGRectGetMaxY(self.contentLab.frame)+10;
}
- (void)setModel:(FriendsDetailModel *)model
{
    _model = model;
    [self.iconView sd_setImageWithURL:[NSURL URLWithString:model.portraitUrl] placeholderImage:GetImage(@"person_avatar")];
    self.nameLab.text = model.nickName;
    self.timeLab.text = model.formatCreateDate;
    self.contentLab.text = model.content;
}

@end
